//
//  WmcLog.swift
//  YPWatermarkCamera
//
//  Created by Json on 2023/7/29.
//

import UIKit

/// 调试打印
public func WmcDebug(_ message: Any, file: String = #file, method: String = #function, line: Int = #line) {
    let wrapper = "😃😃😃"
    WmcLog(message, file: file, method: method, line: line, wrapper: wrapper)
}

/// 信息打印
public func WmcInfo(_ message: Any, file: String = #file, method: String = #function, line: Int = #line) {
    let wrapper = "🌈🌈🌈"
    WmcLog(message, file: file, method: method, line: line, wrapper: wrapper)
}
/// 警告打印
public func WmcWarning(_ message: Any, file: String = #file, method: String = #function, line: Int = #line) {
    let wrapper = "⚡️⚡️⚡️"
    WmcLog(message, file: file, method: method, line: line, wrapper: wrapper)
}

private func WmcLog(_ message: Any, file: String, method: String, line: Int, wrapper: String) {
#if DEBUG
    let time = Date().yp.string(.ymd_hms_iso8601)
    let fileName = (file as NSString).lastPathComponent
    print("[\(time)]-\(fileName).\(method)[\(line)]:\(wrapper)\(message)\(wrapper)")
#endif
}
